"use server";
import { RecordBillsResp } from "@/api/betrecord";
import Box from "@/components/Box";
import { Pagination } from "@/types";
import { server } from "@/utils/server";
import { FC } from "react";
import List from "./components/list";
interface Props {}

const getDataList = async () => {
    return server.request<RecordBillsResp[], Pagination>({
        url: "/v1/api/user/user_bill_list",
        method: "POST",
        data: { current_page: 1, page_size: 30 },
    });
};

const BetRecord: FC<Props> = async (props) => {
    const p = await getDataList();
    return (
        <Box>
            <List record={p}></List>
        </Box>
    );
};

export default BetRecord;
